package com.fanshuai.spring.boot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication(scanBasePackages = "com.fanshuai.spring.boot")
public class MainStarter {
    public static void main(String[] args) throws Exception {
        ApplicationContext context = SpringApplication.run(MainStarter.class, args);

        MainService mainService = context.getBean(MainService.class);
        testMain(mainService);
        System.out.println("closed");
    }

    private static void testMain(MainService mainService) throws Exception {
        //mainService.nativeJdbc();
        //mainService.localJdbc();
        //mainService.localMybatisPlus();

        //mainService.xa();
        //mainService.jta();
        //mainService.jtaSpringTemplate();
        //mainService.jtaJtaTransactionManager();
    }
}
